package cn.ixiaoxin.deepchat.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("message")
public class Message implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;
    private Long fromId;
    private Long toId;
    private String type;
    private String content;
    private Integer isGroup;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    private String fileName;
    private BigDecimal fileSize;
}
